package com.userInfoService;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.actuate.endpoint.Endpoint;
import org.springframework.boot.actuate.health.HealthIndicator;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.context.annotation.Bean;
import org.springframework.scheduling.annotation.EnableScheduling;

import com.userInfoService.actuator.StatusEndPoint;
import com.userInfoService.actuator.StatusHealth;
@EnableEurekaClient
@SpringBootApplication
@EnableScheduling
public class UserInfoServiceApplication {

	public static void main(String[] args) {
		SpringApplication.run(UserInfoServiceApplication.class, args);
	}
	
	@Bean
	public Endpoint<String> myStatus(){
		Endpoint<String> myStatus = new StatusEndPoint();
		return myStatus;
	}
	
	@Bean
	public HealthIndicator statusHealth(){
		HealthIndicator statusHealth = new StatusHealth();
		return statusHealth;
	}
}
